import java.util.HashMap;
import java.util.Map;

    public class GradeSystem {
        private Map<String, Integer> courseScores;

        public GradeSystem() {
            courseScores = new HashMap<>();
        }

        public void addScore(String course, int score) {
            courseScores.put(course, score);
        }

        // 添加统计课程成绩的方法
        public void calculateCourseStatistics(String course) {
            if (courseScores.containsKey(course)) {
                int score = courseScores.get(course);
                System.out.println("课程 " + course + " 的成绩是: " + score);
            } else {
                System.out.println("该课程暂无成绩记录。");
            }
        }
    }

